package oop2;

/**
 * @author oldliu
 * @since 1.0
 */
public class Student {
    String name;
    int java;
    int c;
    int db;

    public Student() {

    }

    public Student(String n, int j, int cyuyan, int d) {
        name = n;
        java = j;
        c = cyuyan;
        db = d;
        show();
        System.out.println("============构造完成==========");
    }

    //提供姓名和java成绩
    public Student(String n, int j) {
        name = n;
        java = j;
    }

    //提供姓名和c成绩来构造
    public Student(int cyuy, String name) {
        name = name;
        c = cyuy;
        this.show(); //调用show方法
    }

    //只有姓名
    public Student(String n) {
        name = n;
    }

    public void show() {
        System.out.println("这个学生叫" + name + ",三门课成绩如下：");
        System.out.println("java=" + java);
        System.out.println("c=" + c);
        System.out.println("db=" + db);
    }
}
